<?php

class PasswordHasher
{
	public static function GenerateSalt( )
	{
		$Key = PasswordGenerator::GeneratePassword( );
		return sha1( $Key );
	}
	public static function GenerateHash( $Password, $Salt )
	{
		return sha1( $Password . $Salt );
	}
	public static function Compare( $Password, $Salt, $Hash )
	{
		return self::GenerateHash( $Password, $Salt ) == $Hash;
	}
}